import Vue from "vue";
import Vuex from "vuex";
Vue.use(Vuex);

const store = new Vuex.Store({
  state: {
    diyTabbarList: [
      {
        text: "首页",
        link: "/pages/home/home",
        icon: "icon-shouye",
        isSelect: true
      },
      {
        text: "筛选",
        link: "/pages/screening/screening",
        icon: "icon-shaixuan",
        isSelect: false
      },
      {
        text: "红娘牵线",
        link: "/pages/matchmaker/matchmaker",
        icon: "icon-airudiantubiaohuizhi-zhuanqu_yujianjiayuan",
        isSelect: false
      },
      {
        text: "有趣的我",
        link: "/pages/user/user",
        icon: "icon-wode",
        isSelect: false
      }
    ]
  },
  mutations: {
    tabbarChange(state, val) {
      state = val;
    }
  },
  actions: {
    //相当于异步的操作,不能直接改变state的值，只能通过触发mutations的方法才能改变
  }
});
export default store;
